//
// Created by Asus on 2025/6/2.
//

#include <iostream>
#include <vector>
#include <bits/ostream.tcc>
using namespace std;

void demo01() {
    vector<int> v;

    v.resize(1);

    int num = 0;
    int *p = nullptr;
    for (int i = 0; i < 10; i++) {
        v.push_back(i);
        if (p != &v[0]) {
            p = &v[0];
            num++;
        }
    }
    cout << "num = " << num << endl;
    cout << "v capacity " << v.capacity() << endl;
    cout << "v size " << v.size() << endl;
}

int main(int argc, char *argv[]) {
    demo01();
    return 0;
}

